<{assign var="is_index_home" value="登录页"}>
<{include file="mobile/block/header.html"}>
<body>
<header class="control">
	<i class="left"><a href="<{if $pager.backurl}><{$pager.backurl}><{else}><{link ctl='mobile/index'}><{/if}>" id="gobackIco"></a></i>
    <div class="title">登录</div>
    <i class="right"><a href="<{link ctl='mobile/passport:signup'}>" class="signupIco">注册</a></i>
</header>
<section id="" class="page_center_box">

	<form id='login-form'>
	<div class="loginInfor">
        <div class="loginIf_list">
			<div class="fl ifIco"><i class="icco icco1"></i>
			</div>
			<div class="ifInput">
				<input type="text" name="data[uname]" placeholder="手机/用户名">
			</div>
			<div class="clear"></div>
		</div>
		 <div class="loginIf_list">
			<div class="fl ifIco"><i class="icco icco9"></i>
			</div>
			<div class="ifInput">
				<input type="password" name="data[passwd]" placeholder="密码">
			</div>
			<div class="clear"></div>
		</div>
        
        <{if $CONFIG.access.verifycode.login}>
        	 <div class="loginIf_list loginIf_list_po">
                <div class="fl ifIco"><i class="icco icco1"></i>
                </div>
                <div class="ifInput">
                    <input class="short lt" type="text" name="verifycode" placeholder="请输入验证码"/>
                </div>
                <div class="rt yanzh"><img verify="#pass-verify" src="<{link ctl='mobile/magic:verify' http='ajax'}>&_=<{$pager.dateline}>" id="pass-verify"/></div>
                <div class="clear"></div>
            </div>
		<{/if}>
     </div>
    <div class="yuee_btn">
    <a  href="#" id='login-btn' class="btn">登录</a>
    </div>
	</form>
	<div class="login_bot pd10">
		<h2><span>第三方登录</span></h2>
		<div class="login_other">
			<a href="<{link ctl='mobile/passport:qqlogin'}>" class="fl"><i class="ico1"></i><p>QQ</p></a>
			<a href="<{link ctl='mobile/passport:weibo'}>" class="fr"><i class="ico2"></i><p>微博</p></a>
			<div class="clear"></div>
		</div>
	</div>
</section>
<script>
$("[verify]").click(function(){
	$($(this).attr("verify")).attr("src", "<{link ctl='mobile/magic:verify' http='ajax'}>&_"+Math.random());
});
</script> 
<script type="text/javascript">
$(document).ready(function(){
    $("#login-btn").click(function(){
        $.post('<{link ctl="mobile/passport:login"}>',$("#login-form").serialize(),function(ret){
            if(ret.error){
                 Widget.MsgBox.error(ret.message.join(","));
            }else{
                window.location="<{link ctl='mobile/ucenter/index'}>";
            }
        },'json');
    });        
});
</script>
</body>
</html>
